package ${pk.entityPackage};
<#if (pk.entitySuperClassName)??>

import ${pk.entitySuperClassPackage}.${pk.entitySuperClassName};
</#if>
<#if hasDate>

import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
</#if>

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

<#list pk.entityImportPackages as eip>
import ${eip};
</#list>


<#assign nowDate = .now>
/**
 * ${table.comments!} 实体类
 *
 * @author ${author!'作者走丢了'}
 * @created ${nowDate?string("yyyy-MM-dd HH:mm:ss")}
 */
@Data
@ToString
@Component
@Accessors(chain = true)
@TableName("${tableName}")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="${pk.entityName}对象", description="${table.comments!}")
public class ${pk.entityName} <#if (pk.entitySuperClassName)??> extends ${pk.entitySuperClassName}</#if>{
<#list table.fields as field>
    <#if !field.commonField>

    /**
     * ${field.comments!}
     */<#if field.pkField>
    @TableId(value = "id", type = IdType.AUTO )<#else>
    @TableField(value = "${field.fieldName}")</#if>
    @ApiModelProperty(value = "${field.comments!}")
    <#if field.javaSimpleType =='Date'>
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    </#if>
    private ${field.javaSimpleType} ${field.entityFieldName};
    </#if>
</#list>

}
